package cn.didi.feidi.androidorder.api;

/**
 * api的实现类
 *
 * Created by king on 2017/7/5.
 */

public class ApiImpl implements Api{
    private final static String PLATFORM_KEY = "ANDROID_DELIVER_167";
    private final static String TIME_OUT_EVENT = "CONNECT_TIME_OUT";
    private final static String TIME_OUT_EVENT_MSG = "连接服务器失败";
    // http引擎
    private HttpEngine httpEngine;

    public ApiImpl() {
        httpEngine = HttpEngine.getInstance();
    }

//    @Override
//    public ApiResponse<List<Object>> listCommodity(String token, int pageNum, int pageSize, String name, String introduce, String userId) {
//        Map<String, String> paramMap = new HashMap<String, String>();
//        paramMap.put("token", token);
//        paramMap.put("pageNum", String.valueOf(pageNum));
//        paramMap.put("pageSize", String.valueOf(pageSize));
//        paramMap.put("name", name);
//        paramMap.put("introduce", introduce);
//        paramMap.put("userId", userId);
//
//        Type type = new TypeToken<ApiResponse<List<Object>>>() {
//        }.getType();
//        try {
//            return httpEngine.postHandle(Api.LIST_COMMODITY, paramMap, type);
//        } catch (IOException e) {
//            return new ApiResponse(TIME_OUT_EVENT, TIME_OUT_EVENT_MSG);
//        }
//    }
}
